﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WooCoo.ObjectModel
{
    /// <summary>
    /// 实体的数据仓库工厂
    /// </summary>
    public interface IRepositoryFactory
    {
        /// <summary>
        /// 创建一个对应实体类型的LazyProvider
        /// </summary>
        /// <param name="entityType"></param>
        /// <returns></returns>
        IRepository Create(Type entityType);
        /// <summary>
        /// 获取指定类型的Repository实现类
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <returns></returns>
        IRepository<T> GetRepository<T>() where T : Entity;
    }
}
